<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1971440_xpnt79rju.css">
    <style>
        .box{
            width: 100px;
            height: 100px;
            margin: 0 auto;
            background-color: #24272C;
        }
        
        #iconfont{
            color: white;
            font-style: normal;
            margin-left:80px ;
            transition: all .5s ease;
            transform-origin: 50% 50%;
        }
        .animate{
            transform: rotate(90deg) translateX(5px);
        }

    </style>
    <body>
        <div class="box">
        <div id=iconfont><i  class="iconfont iconarrow-right"></i></div>
    </div>
    <script>
        document.getElementById('iconfont').onclick=function(){
            this.classList.toggle('animate');
           
        }
    </script>
        
            
    </body>
</head>
<body>
    
</body>
</html>